package com.lqq.designPattern.bulider_pattern.factory.factoryMethod;

public class Client {
    public static void main(String[] args) {
        //创建咖啡店
        CoffeeStore coffeeStore = new CoffeeStore();
        //创建工厂
        //CoffeeFactory factory= new AmericanCoffeeFactory();
        CoffeeFactory factory = new LatteCoffeeFactory();
        //给咖啡店具体咖啡工厂
        coffeeStore.setCoffeeFactory(factory);
        //点咖啡
        Coffee coffee = coffeeStore.orderCoffee();

        System.out.println(coffee.getName());
    }
}
